Installing the AHM E-Mail Components

See also

Complete Overview

After opening Delphi 3.0 go to Components/Install Packages on the Menu

-	press the Add Button and navigate to the Lib Directory in the Directory where you installed the AHM Files

-	Add Emails30.dpl

-	Done ...

After opening Delphi 4.0 go to Components/Install Packages on the Menu

-	press the Add Button and navigate to the Lib Directory in the Directory where you installed the AHM Files

-	Add Emails40.bpl

-	Done ...

After opening C++Builder 3.0 go to Components/Install Packages on the Menu

-	press the Add Button and navigate to the Lib Directory in the Directory where you installed the AHM Files

-	Add EmailsC30.bpl

-	Done ...

-	Copy all Files in the AHM Mail Help Directory into the Delphi Help Directory

-	Edit the following Files from the Delphi Help Directory

-	Open Delphi3.cfg/Delphi4.cfg in a Texteditor

-	Add the following Lines as under Third Party Help

   :Link ahmmail.hlp

-	Open Delphi3.cnt/Delphi4.cnt

-	Add the following line as the third line in the file

   :Index AHM Mail Triton 98 =ahmmail.hlp

-	Add the following line as the last line in the file

   :Include ahmmail.cnt


Copyright
Copyright Information

See also

Complete Overview

The AHM Components are shareware even in the event of you being a registered User. This means:

All copyrights to the AHM Components are exclusively owned by the author - Alexander Mehlhorn (AHM).

Anyone may use this software during the Trialperiod until they expire. Following this test period  if you wish to continue to use the AHM Components you must register.

Once registered, the user is granted a non-exclusive license to use AHM Components on one computer (i.e. a single cpu) for the building of Applications.  The registered AHM Components may not be rented, sold, leased or permanently transferred.

The AHM Components Trialware Version may be freely distributed, provided the distribution package is not modified. No person or company may charge a fee for the distribution of the AHM Components without written permission from the copyright holder.

To register you must follow the instructions provided for in this Helpfile.

The AHM Components are distributed "as is".  No warranty of any kind is expressed or implied.  You use them at your own risk. The author will not be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.

There are NO additional license fees, apart from the cost of registration, associated with the creation and distribution of software using the AHM Components. You may not use, copy, emulate, clone, rent, lease, sell, modify, decompile, disassemble, otherwise reverse engineer, or transfer the licensed software version or any subset of it, except as provided for in this agreement.  Any such unauthorized use shall result in immediate and automatic termination of this license and may result in criminal and/or civil prosecution.

All rights not expressly granted here are reserved by Alexander Mehlhorn.

Installing and using the AHM Components signifies acceptance of these terms and conditions of the license.

If you do not agree with the terms of this license you must remove all files from your storage devices and cease to use the product.

Any Internet Site and their registered owners distributing registered versions of the AHM Components will be prosecuted to the fullest extend possible under the copyright law.

Any persons violating the shareware principle will be prosecuted under the fullest extend of the law.

Any people writing up different agreements for this software without the authors permission will be prosecuted to the fullest extend of the law.


Registering the AHM E-Mail Components
Registering the AHM Mail Components

See also

Complete Overview

I was hoping you would come here . Well I put my ear around and have come up with the following price after speaking to a couple of people around.

The version without Source : $49

The version with Source      : $119

Where to obtain it ? Go to http://www.ahm.co.za for Online Registration.
For upgrades in 1998 and of Triton98 Components feel free to contact me by e-mail and after I have certified that you are a registered user I will just mail you the new version if it is available. Please ensure that you supply the exact version number you are using when asking for an upgrade so I know what you will be getting yourself into.

You don’t have a credit card ? Well send me some mail and I will send you my Bank details or my Postal Address for any other way that you might prefer. Not satisfied ? Well then tell me so and I will look into what else I can do but for now that is all I can offer for something that hopefully will let your clients go : "Ohhh how did you do that ?"


About AHM and his Software

See also

Complete Overview

Well what am I supposed to tell you about me ? That I am under full time employment at Levi Strauss and this is only my part time hobby/job ? That I have been developing Delphi Software since right of the beginning of Delphi's first release ? That the AHM Triton Tools are also developed by me ? No, lets not go into that Detail. I think you know that all and I think all I should say is the following :

Come visit my Homepage and get some of the other great tools for the best development evironment around - Delphi !

Alexander Mehlhorn (AHM)
Developer of the AHM Add-Ons for Delphi and C++ Builder
Contact me at :
URL : South Africa : http://www.ahm.co.za

URL : Germany : http://www.webset.de/software/ahm
Mail : support@ahm.co.za

Phone : +27837616139
You are welcome to contact me in regards to any questions, ideas or problems you might have.


Complete Overview
AHM Mail Components Triton 98

Complete Overview over all Declarations contained in the all units and all Information related to the AHM Mail Components Triton 98
Installing the components and configuring the context-sensitive Help

About the Author and whatever else

Register Information and Price Details

Copyright Information

Overview of all Units used

Overview of all Classes and Components defined

Overview of all external Procedures and Functions defined

Overview of all Types, Records and Events defined


Units Overview

See also

Complete Overview

Description

All units used

Units

AHMTMapiMail Unit

AHMTIEmails Unit


Procedures and Functions Overview

See also

Complete Overview

Description

Complete Listing of all external Procedures and Functions

Procedures and Functions


Classes and Components Overview

See also

Complete Overview

Description

Complete Listing of all Classes and Components

Classes and Components

TAHMMapiAttachment

TAHMMapiAttachments

TAHMMapiMessage

TAHMMapiMessages

TAHMMapiMail

TAHMQuickMail

TAHMAttachment

TAHMAttachments

TAHMMessage

TAHMMessages

TAHMMailHost

TAHMSMTPMail

TAHMPOPMail


Types, Records and Events Overview
Types, Variables and Constants Overview

See also

Complete Overview

Description

Complete Listing of all Types, Records and Events

Types, Records and Events

TAHMOnSendError Event Type

TAHMMapiSend Event Type

TAHMMapiConnect Event Type

TAHMMapiRecipArray Type

TAHMFaxorMail Type

TAHMMailSessionState Type

TAHMOnError Event Type

TAHMOnRead Event Type

TAHMOnCodingStart Event Type

TAHMOnCodingProgress Event Type

TAHMSendingProgress Event Type

TAHMOnDelete Event Type

TAHMBeforeRetrieve Event Type


AHMTMapiMail Unit

See also

Complete Overview

Type, Records and Event Declarations

  TAHMOnSendError

  TAHMMapiSend

  TAHMMapiConnect

  TAHMMapiRecipArray

Classes & Components

  TAHMMapiAttachment

  TAHMMapiAttachments

  TAHMMapiMessage

  TAHMMapiMessages

  TAHMMapiMail

  TAHMFaxorMail

  TAHMQuickMail


AHMTIEmails Unit

USES

SysUtils, Windows,  Classes, AHMMails, Scktcomp

See also

Units Overview

Type, Records and Event Declarations

  TAHMMailSessionState

  TAHMOnError

  TAHMOnRead

  TAHMOnCodingStart

  TAHMOnCodingProgress

  TAHMSendingProgress

  TAHMOnDelete

  TAHMBeforeRetrieve

Classes & Components

  TAHMAttachment

  TAHMAttachments

  TAHMMessage

  TAHMMessages

  TAHMMailHost

  TAHMSMTPMail

  TAHMPOPMail


TAHMOnSendError Event Type

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

TAHMOnSendError = Procedure(Sender : TObject; ErrorNo : Integer; Mail : TAHMMapiMessage) Of Object;

Description

Notification type for error messages returning the actual errornumber and the full message class to the user for exact processing.


TAHMMapiSend Event Type

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

TAHMMapiSend = Procedure(Sender : TObject; Mail : TAHMMapiMessage) Of Object;

Description

Notification type that returns the Mapimessage class to your event for processing which message is currently being send.


TAHMMapiConnect Event Type

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

TAHMMapiConnect = Procedure(Sender : TObject; ErrorNo : Integer) Of Object;

Description

Notification type that returns you the errornumber of an error occured while connecting to the server.


TAHMMapiRecipArray Type

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

TAHMMapiRecipArray = Array[1..999] Of TMapiRecipdesc;

Description

Array of recipients.


Properties & Events

Owner

Filename


Methods

Create


TAHMMapiAttachment Class

Properties & Events	Methods

UNIT

AHMTMapiMail

See also

Components and Classes Overview

Declaration

TAHMMapiAttachment = Class(TCollectionItem)

Description

Class that provides access to an attachment as it forms part of the mailmessage. Use this class in runtime to access the properties and methods of an attached file.


Create Procedure

UNIT

AHMTMapiMail

Declaration

Constructor Create(Collection: TCollection); Override;

Description :

Constructor for file attachments. Call this procedure to create an attachment that forms part of a message.


Owner Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMapiMessage

Used in

TAHMMapiAttachment

Description

Owner of the Attachement. This property is readonly and returns you the message this attachment belongs to.


Filename Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Filename : String

Used in

TAHMMapiAttachment

Description

Property that displays the name of the attached File.


Properties & Events

Items


Methods

Add


TAHMMapiAttachments Class

Properties & Events	Methods

UNIT

AHMTMapiMail

See also

Components and Classes Overview

Declaration

TAHMMapiAttachments = Class(TCollection)

Description

Access to all Attachements belonging to the specified Message.


Add Function

UNIT

AHMTMapiMail

Declaration

Function Add(Filename : String) : TAHMMapiAttachment;

Description :

Adds an Attachment to the Message returning you access to the TAHMMapiAttachment Object that this file will belong to.


Items Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Items[Index: Integer]: TAHMMapiAttachmentread GetAHMMapiAttachment

Used in

TAHMMapiAttachments

Description

Array of all Attachments that belong to the specific message the TAHMMapiAttachments class forms part of. This property allows you to access the attachments as if they were part of a list.


Properties & Events

Owner

Message

Attachments

Subject

RecipientsTo

RecipientsCC

RecipientsBC

Receipt

Dialog


Methods

Create


TAHMMapiMessage Class

Properties & Events	Methods

UNIT

AHMTMapiMail

See also

Components and Classes Overview

Declaration

TAHMMapiMessage = Class(TCollectionItem)

Description

This class provides access to the properties of a message such as who it will be sent to, its subject, the actual message and the attachments. Each message will belong to its own class.


Create Procedure

UNIT

AHMTMapiMail

Declaration

Constructor Create(Collection: TCollection); Override;

Description :

Constructor to create a message on top of the owner of the collection. The owner of the collection is the instance of the TAHMMapiMail component this message will belong to. Use this constructor to create message in runtime.


Owner Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMapiMail

Used in

TAHMMapiMessage

Description

Read only property that returns the owner of the message in run-time.


Message Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Message : TStrings

Used in

TAHMMapiMessage

Description

Actual Message that will be sent to the recipients. Use this property like a stringlist.


Attachments Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Attachments: TAHMMapiAttachments

Used in

TAHMMapiMessage

Description

Property that provides access to all the Attachments that belong to the message. See the TAHMMapiAttachments class for more details.


Subject Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Subject : String

Used in

TAHMMapiMessage

Description

Subject that will display on the subject line of the recipient.


RecipientsTo Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property RecipientsTo : TStrings

Used in

TAHMMapiMessage

Description

List of people this message will be sent to. use a new line for each new recipient.


RecipientsCC Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property RecipientsCC : TStrings

Used in

TAHMMapiMessage

Description

List of people this message will be copied to. Use a new line for each new recipient.


RecipientsBC Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property RecipientsBC : TStrings

Used in

TAHMMapiMessage

Description

Blind Copy recipients. These people will not be visible to other recipients that will receive this message, but they will also receive a copy of the actual message.


Receipt Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Receipt : Boolean

Used in

TAHMMapiMessage

Description

If enabled a return of a receipt is requested by the user.


Dialog Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Dialog : Boolean

Used in

TAHMMapiMessage

Description

If enabled a dialog will be provided from the Mapisystem to guide the user through the sending of the message.


Properties & Events

Owner

Items


Methods

Add

Delete


TAHMMapiMessages Class

Properties & Events	Methods

UNIT

AHMTMapiMail

See also

Components and Classes Overview

Declaration

TAHMMapiMessages = Class(TCollection)

Description

Class that provides access to all Messages that are currently attached to the Component.


Owner Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMapiMail

Used in

TAHMMapiMessages

Description

Read-only property that returns the owner of the component.


Add Function

UNIT

AHMTMapiMail

Declaration

Function Add : TAHMMapiMessage;

Description :

Function that enables you to add another message in runtime. See the examples for an exact demonstration on how to do this.


Delete Function

UNIT

AHMTMapiMail

Declaration

Function Delete(Index : Integer) : Boolean;

Description :

Function that allows you to delete a specified message from the list of messages that are currently attached to the component.


Items Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Items[Index: Integer]: TAHMMapiMessage

Used in

TAHMMapiMessages

Description

Property that allows you access to all messages that are currently attached to the component.


Properties & Events

MAPIAvail

  NewSession

  Messages

  Password

  Profile

  DefaultProfile

  Signature

  DeleteAfterSend

  BeforeLogon

  BeforeSendAll

  AfterSendAll

  BeforeLogoff

  AfterExecute

  OnSendError

  OnLogonSuccess

  OnLogonFailure

  OnLogoffSuccess

  OnMapiNotAvailable

  OnLogoffFailure

  BeforeSendMail

  AfterSendMail

  OnDeleteMail


Methods

Execute


TAHMMapiMail Component Example

Example :

Full Examples to the Components are provided in the Installation Directory .


 TAHMMapiMail Component

Properties&Events	Methods	Example

UNIT

AHMTMapiMail

See also

Classes & Components Overview

Declaration

TAHMMapiMail = Class(TAHMMailsComponent)

Description

This component allows you to send Messages and Faxes using the Microsoft Mail API.


Execute Function

UNIT

AHMTMapiMail

Declaration

Function Execute : Boolean; Override;

Description :

Call execute to send all messages out to the recipients of each individual message. Before calling this function a second time please ensure that all messages that were successfully sent were deleted from the component if you dont want them to be resend.


MAPIAvail Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property MAPIAvail : Boolean

Used in

TAHMMapiMail

Description

Property that returns a boolean indicating if MAPI is available on the current system the Application is installed on. If MAPI is available the Component can use its functionality on this system.


NewSession Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property NewSession : Boolean

Used in

TAHMMapiMail

Description

Indicates to the MAPI system installed on the machine if it must use a new session when sending the messages.


Messages Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Messages : TAHMMapiMessages

Used in

TAHMMapiMail

Description

Property that allows access to the messages.


Password Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Password : String

Used in

TAHMMapiMail

Description

If the Mapi System on the Applications runtime environment requires a password it needs to be stated here if you want to proceed without using Dialogs from the MAPI System.


Profile Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Profile : String

Used in

TAHMMapiMail

Description

If the Applications runtime environment has a profile configured for the specific user you need to enter the profile name if you want the Application to proceed sending Messages without using Dialogs.


DefaultProfile Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property DefaultProfile : Boolean

Used in

TAHMMapiMail

Description

If this property is enabled the Component will override the configured profile and password and try to retrieve the default profile in order to send messages.


Signature Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Signature : TStrings

Used in

TAHMMapiMail

Description

Use this property to configure a signature which will automatically be attached to the bottom of each message that is send out.


DeleteAfterSend Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property DeleteAfterSend : Boolean

Used in

TAHMMapiMail

Description

If this property is enabled the TAHMMapiMessage class will automatically be destroyed upon sending the message successfully.


BeforeLogon Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property BeforeLogon : TNotifyEvent

Used in

TAHMMapiMail

Description

Event that will trigger before the component is logging onto the MAPI System. Use this event to display message on the screen indicating to the user what the application is in process of doing.


BeforeSendAll Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property BeforeSendAll : TNotifyEvent

Used in

TAHMMapiMail

Description

Event that triggers before any message is send out.


AfterSendAll Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property AfterSendAll : TNotifyevent

Used in

TAHMMapiMail

Description

Event that triggers after all messages are sent out.


BeforeLogoff Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property BeforeLogoff : TNotifyEvent

Used in

TAHMMapiMail

Description

Event that triggers before the Application logs itself out of the MAPI System.


AfterExecute Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property AfterExecute : TNotifyEvent

Used in

TAHMMapiMail

Description

Event that triggers after the execute function has finished.


OnSendError Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnSendError : TAHMOnSendError

Used in

TAHMMapiMail

Description

Event that triggers when an error occurs sending the messages.


OnLogonSuccess Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnLogonSuccess : TNotifyevent

Used in

TAHMMapiMail

Description

Event that triggers when the Application has successfully logged itself onto the MAPI System.


OnLogonFailure Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnLogonFailure : TAHMMapiConnect

Used in

TAHMMapiMail

Description

Event that triggers when the Application has failed to log itself onto the MAPI System.


OnLogoffSuccess Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnLogoffSuccess : TNotifyEvent

Used in

TAHMMapiMail

Description

Event that triggers when the Application has logged itself successfully out of the MAPI System.


OnMapiNotAvailable Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnMapiNotAvailable : TNotifyevent

Used in

TAHMMapiMail

Description

Event that triggers when the MAPI System is found not to be available.


OnLogoffFailure Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnLogoffFailure : TAHMMapiConnect

Used in

TAHMMapiMail

Description

Event that triggers when the Application can not log out off the MAPI System.


BeforeSendMail Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property BeforeSendMail : TAHMMapiSend

Used in

TAHMMapiMail

Description

Event that triggers before each message is send.


AfterSendMail Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property AfterSendMail : TAHMMapiSend

Used in

TAHMMapiMail

Description

Event that triggers everytime a message has been send.


OnDeleteMail Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnDeleteMail : TAHMMapiSend

Used in

TAHMMapiMail

Description

Event that triggers when a Message is destroyed upon completion.


TAHMFaxorMail Type

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

TAHMFaxorMail = (CcMail, CcFax);

Description

Type of service that will be used to send this message.

CcMail - this message will be send using Mail

CcFax - this message will be send using Fax


Properties & Events

  ToEmailorFaxAddress

  ToName

  TextToSend

  Subject

  MailorFax

  ErrorNo

  BeforeSend

  OnError


Methods

Execute


TAHMQuickMail Component Example

Example :

Full Examples to the Components are provided in the Installation Directory.


 TAHMQuickMail Component

Properties&Events	Methods	Example

UNIT

AHMTMapiMail

See also

Classes & Components Overview

Declaration

TAHMQuickMail = Class(TAHMMailsComponent)

Description

Component that uses very basic functionality to send a quick message using the MAPI System.


Execute Function

UNIT

AHMTMapiMail

Declaration

Function Execute : Boolean; Override;

Description :

Call execute to send this message.


ToEmailorFaxAddress Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property ToEmailorFaxAddress : String

Used in

TAHMQuickMail

Description

Use this property to provide the email address or fax number of the recipient.


ToName Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property ToName : String

Used in

TAHMQuickMail

Description

Name of the Person this mail will be send to.


TextToSend Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property TextToSend : TStrings

Used in

TAHMQuickMail

Description

The text of the actual message that will be send.


Subject Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property Subject : String

Used in

TAHMQuickMail

Description

Text that will display in the subject line of the message.


MailorFax Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property MailorFax : TAHMFaxorMail

Used in

TAHMQuickMail

Description

Indicate the type of service that will be used to send this message.


ErrorNo Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property ErrorNo : String

Used in

TAHMQuickMail

Description

Error number of the last error that occured when sending a message.


BeforeSend Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property BeforeSend : TNotifyevent

Used in

TAHMQuickMail

Description

Event that triggers before a message is send out to the recipient.


OnError Property

UNIT

AHMTMapiMail

See also

Types, Records and Events Overview

Declaration

Property OnError : TNotifyevent

Used in

TAHMQuickMail

Description

Event that triggers when an error occurs sending the message.


TAHMMailSessionState Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMMailSessionState = (Authorization,  Transaction);

Description

Indicates the state the component is in.


TAHMOnError Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMOnError = Procedure(Sender: TObject; Error: Integer; VMessage: String) Of Object;

Description

Notification type for the event of an error.


TAHMOnRead Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMOnRead = Procedure(Sender: TObject; BytesRead: Integer) Of Object;

Description

Notification type for the actual bytes read when receiving a message.


TAHMOnCodingStart Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMOnCodingStart = Procedure(Sender: TObject; FileName: String; BytesCount: Longint) Of Object;

Description

Event type for decoding/encoding the file that will be send or has been received.


TAHMOnCodingProgress Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMOnCodingProgress = Procedure(Sender: TObject; Percent: Word) Of Object;

Description

Event type that returns the percentage of encoding/decoding done.


TAHMSendingProgress Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMSendingProgress = Procedure(Sender: TObject; Percent: Word) Of Object;

Description

Event type that returns the percentage of the message that has been sent.


TAHMOnDelete Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMOnDelete = Procedure(Sender: TObject; Index: Word) Of Object;

Description

Event type that returns the index of the message that is being deleted.


TAHMBeforeRetrieve Event Type

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

TAHMBeforeRetrieve = Procedure(Sender: TObject; Index: Word) Of Object;

Description

Event type that returns the index of the message that is going to be received.


Properties & Events

Owner

MimeType

FileName


Methods

Create

SaveToFile


TAHMAttachment Class

Properties & Events	Methods

UNIT

AHMTIEmails

See also

Components and Classes Overview

Declaration

TAHMAttachment = Class(TCollectionItem)

Description

Class that forms the interface to an attachment that belongs to a specific message.


Create Procedure

UNIT

AHMTIEmails

Declaration

Constructor Create(Collection: TCollection); Override;

Description :

Use this constructor only when creating your own messages in runtime.


SaveToFile Procedure

UNIT

AHMTIEmails

Declaration

Procedure SaveToFile(FileName : String);

Description :

Call this procedure to save the attachment to a specific file.


Owner Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMessage

Used in

TAHMAttachment

Description

Returns the Message class this attachment belongs to.


MimeType Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property MimeType: String

Used in

TAHMAttachment

Description

Returns that Mimetype used.


FileName Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property FileName: String

Used in

TAHMAttachment

Description

Returns/sets the filename of the attachment.


Properties & Events

Items


Methods

Add

Delete


TAHMAttachments Class

Properties & Events	Methods

UNIT

AHMTIEmails

See also

Components and Classes Overview

Declaration

TAHMAttachments = Class(TCollection)

Description

Class that configures all properties for the individual attachments of the message.


Add Function

UNIT

AHMTIEmails

Declaration

Function Add(Filename : String) : TAHMAttachment;

Description :

Use this function to add an attachment to a message.


Delete Function

UNIT

AHMTIEmails

Declaration

Function Delete(Index : Integer) : Boolean;

Description :

Use this function to delete a specific attachment from the message.


Items Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Items[Index: Integer]: TAHMAttachment;

Used in

TAHMAttachments

Description

Use this property to access all items that are attachments belonging to the message.


Properties & Events

Owner

Date

MessageID

InReplyTo

FromMail

ReplyTo

SendTo

Subject

FromName

Message

Attachments


TAHMMessage Class

Properties & Events

UNIT

AHMTIEmails

See also

Components and Classes Overview

Declaration

TAHMMessage = Class(TCollectionItem)

Description

Class that provides access to all properties of a message. For example its attachments, the recipients, the e-mail address , the subject and the actual message.


Owner Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMailHost

Used in

TAHMMessage

Description

Returns the owner component of the message.


Date Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Date : String

Used in

TAHMMessage

Description

The date on which this message was sent or will be send.


MessageID Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property MessageID : String

Used in

TAHMMessage

Description

The ID of the actual message.


InReplyTo Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property InReplyTo : String

Used in

TAHMMessage

Description

In reply to which message this message is sent.


FromMail Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property FromMail : String

Used in

TAHMMessage

Description

E-Mail Address of the sender. Usually that would be the person who is sending the mail. (Please do not abuse this for spamming people)


ReplyTo Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ReplyTo : String

Used in

TAHMMessage

Description

E-Mail address the recipient will be replying to when sending a reply. This is in most cases the same as the FromMail Property.


SendTo Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property SendTo : String

Used in

TAHMMessage

Description

E-Mail address of the person/company this message is sent to.


Subject Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Subject : String

Used in

TAHMMessage

Description

Subject of the actual message. This line will display in the subject line of the e-mail when it arrives at its destination.


FromName Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property FromName : String

Used in

TAHMMessage

Description

Name of the person sending the mail. This name will display as the From Name to the recipient.


Message Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Message : TStrings

Used in

TAHMMessage

Description

The actual Message that will be sent to the recipient.


Attachments Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Attachments: TAHMAttachments

Used in

TAHMMessage

Description

The attachments that will be sent to the recipients.


Properties & Events

Owner

Items


Methods

Add

Delete


TAHMMessages Class

Properties & Events	Methods

UNIT

AHMTIEmails

See also

Components and Classes Overview

Declaration

TAHMMessages = Class(TCollection)

Description

Class that provides access to all individual messages currently configured for the component.


Owner Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Owner : TAHMMailHost

Used in

TAHMMessages

Description


Add Function

UNIT

AHMTIEmails

Declaration

Function Add : TAHMMessage;

Description :

Function that allows you to add a message to the component. This message will be sent to the enduser the next time the components execute function is called.


Delete Function

UNIT

AHMTIEmails

Declaration

Function Delete(Index : Integer) : Boolean;

Description :

Function that allows you to delete an individual message out of the components message array. Deleted Messages can not be recovered from so please be careful when using this function. It would be required for you to build your own Message Backup to keep all messages that were either received or send in a separate place.


Items Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Items[Index : Integer] : TAHMMessage

Used in

TAHMMessages

Description

All Messages that belong to the Component.


Properties & Events

  Messages

  OnExecute

  ProgressStep

  Port

  Host


Methods

Execute


TAHMMailHost Component Example

Example :

Full Examples to the Components are provided in the Installation Directory in the final release only


TAHMMailHost Component
TAHMMailHost Component Class

Properties&Events	Methods	Example

UNIT

AHMTIEmails

See also

Classes & Components Overview

Declaration

TAHMMailHost = Class(TAHMMailsComponent)

Description

Component Class is an abstract class that is the anchestor for the TAHMPopMail and the AHMSMTPMail Component classes. This component has all properties defined that are related to storing message information.


Execute Function

UNIT

AHMTIEmails

Declaration

Function Execute : Boolean; Override;

Description :

This function implements the default behaviour for both the send and the retrieve execute functions on the respective components.


Messages Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Messages: TAHMMessages

Used in

TAHMMailHost

Description

Property that stored information about the messages being sent or retrieved.


OnExecute Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnExecute : TNotifyevent

Used in

TAHMMailHost

Description

Event that triggers when the component is about to send or retrieve any messages and the function execute was called in order to do so.


ProgressStep Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ProgressStep : TAHMPStep

Used in

TAHMMailHost

Description

Component that indicates the number of steps taken in the progress of the current operation.


Port Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Port : String

Used in

TAHMMailHost

Description

Property that stores information about the port on which to send or to retrieve information.

It is equal to the standard port 25 for sending messages and port 110 for retrieving messages by default so it is not necessary to set it unless a non standard port is used.


Host Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Host : String

Used in

TAHMMailHost

Description

The name of the host. The host is an address like mail.provider.com. Please reference the Internet Provider to find out which host you are connecting to.


Properties & Events

Connected

ReplyCode

ReplyString

SMTPError

Canceled

  Signature

  DateTimeFormat

  OnConnect

  OnDisconnect

  OnError

  OnBeforeSend

  OnAfterSend

  OnEncodeStart

  OnEncodeProgress

  OnEncodeEnd

  OnSendProgress


Methods

Create

Destroy

Connect

Disconnect

Execute

SendMessage


TAHMSMTPMail Component Example

Example :

Full Examples to the Components are provided in the Installation Directory.


 TAHMSMTPMail Component

Properties&Events	Methods	Example

UNIT

AHMTIEmails

See also

Classes & Components Overview

Declaration

TAHMSMTPMail = Class(TAHMMailHost)

Description

The TAHMSMTPMail Component is used to develop Delphi applications that communicate with SMTP servers to send mail. It implements the basic client SMTP Protocol and provides a reusable component that gives applications access to SMTP mail servers and mail sending capabilities.


Create Procedure

UNIT

AHMTIEmails

Declaration

Constructor Create(AOwner: TComponent); Override;

Description :

Call Create to create a TAHMSMTPMail component at runtime. Components placed on forms at design time are created automatically. Create calls the inherited Create method, then sets the initial values for the Mail component, including creating the Messages property.


Destroy Procedure

UNIT

AHMTIEmails

Declaration

Destructor Destroy; Override;

Description :

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the mail component has not already been freed, and only then calls Destroy. Destroy frees the Items property, and then calls the inherited Destroy method.


Connect Procedure

UNIT

AHMTIEmails

Declaration

Procedure Connect;

Description :

Procedure that will connect the components application to the mail server. You will not have to call this procedure directly as it is called from the execute function automatically.


Disconnect Procedure

UNIT

AHMTIEmails

Declaration

Procedure Disconnect;

Description :

Procedure that will disconnect the components application from the mail server. You will not have to call this procedure directly as it is called from the execute function automatically.


Execute Function

UNIT

AHMTIEmails

Declaration

Function Execute : Boolean; Override;

Description :

When this function is called the component automatically connects to the mail server. It then sends the configured messages and removes the relevant messages if configured to do that. After it has finished processing all messages it will disconnect from the mail server and return input to the user.


SendMessage Function

UNIT

AHMTIEmails

Declaration

Function SendMessage(VMessage: TAHMMessage): Boolean;

Description :

Function that will only send a specific Message to its recipients. You will have to connect and disconnect to and from the mail server using the respective function.


Connected Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Connected : Boolean

Used in

TAHMSMTPMail

Description

The connected property indicates the current state of connection to the mail server.


ReplyCode Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ReplyCode : String

Used in

TAHMSMTPMail

Description

Replycode stores the code that the server replied when sending a message in string format. This code is used to identify the messages received by the server.


ReplyString Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ReplyString : String

Used in

TAHMSMTPMail

Description

Stores the message that was replied then the application is talking to the mailserver.


SMTPError Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property SMTPError : Boolean

Used in

TAHMSMTPMail

Description

Stores a boolean indicating if an error occurred when sending the message.


Canceled Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Canceled : Boolean

Used in

TAHMSMTPMail

Description

Indicates the state of the Operation. If set to true the operation was cancelled.


Signature Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Signature : TStrings

Used in

TAHMSMTPMail

Description

Use this property to identify a default text that will be attached as signature to each and every message that is sent to its recipients.


DateTimeFormat Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property DateTimeFormat : String

Used in

TAHMSMTPMail

Description

Stores the format in which to send dates and times of the messages across the Internet.


OnConnect Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnConnect: TNotifyEvent

Used in

TAHMSMTPMail

Description

Event that triggers when the application connects to the mail server.


OnDisconnect Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDisconnect: TNotifyEvent

Used in

TAHMSMTPMail

Description

Event that triggers when the Application disconnects from the mailserver.


OnError Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnError: TAHMOnError

Used in

TAHMSMTPMail

Description

Event that triggers when an error occurred during the processing of the current operation.


OnBeforeSend Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnBeforeSend: TNotifyEvent

Used in

TAHMSMTPMail

Description

Event that triggers before a message is send to its recipients.


OnAfterSend Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnAfterSend: TNotifyEvent

Used in

TAHMSMTPMail

Description

Event that triggers after a message has been sent to its recipients.


OnEncodeStart Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnEncodeStart: TAHMOnCodingStart

Used in

TAHMSMTPMail

Description

Event that triggers when the Application starts encoding the properties of the message about to be sent.


OnEncodeProgress Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnEncodeProgress: TAHMOnCodingProgress

Used in

TAHMSMTPMail

Description

Event that triggers when the encode process has progressed a step further.


OnEncodeEnd Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnEncodeEnd: TNotifyEvent

Used in

TAHMSMTPMail

Description

Event that triggers when the application has finished encoding the properties of the message that is about to be sent.


OnSendProgress Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnSendProgress: TAHMSendingProgress

Used in

TAHMSMTPMail

Description

Event that triggers when the send operation progresses. Use this event to display the state of the send process to the user.


Properties & Events

DeletedItems

POPError

ErrorString

VMessagesCount

SessionState

Connected

ReplyCode

ReplyString

Canceled

  DeleteOfServer

  Username

  Password

  OnConnect

  OnDisconnect

  OnError

  OnDecodeStart

  OnDecodeProgress

  OnDecodeEnd

  BeforeRetrieve

  AfterRetrieve

  OnRetrieveProgress

  OnDelete


Methods

Connect

Login

Init

RetrieveMessage

RetrieveAllMessages

RetrieveHeaders

DeleteMessage

Disconnect

Execute


TAHMPOPMail Component Example

Example :

Full Examples to the Components are provided in the Installation Directory.


 TAHMPOPMail Component

Properties&Events	Methods	Example

UNIT

AHMTIEmails

See also

Classes & Components Overview

Declaration

TAHMPOPMail = Class(TAHMMailHost)

Description

Component that allows you to receive and read message which are in your mail box on the configured Mailserver. The TAHMPOPMail Component provides access to Internet mail servers using the POP3 protocol  and can be used by Internet mail developers or system integrators.


DeletedItems Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property DeletedItems : TStrings

Used in

TAHMPOPMail

Description

Contains a list of indexes of all messages that where removed from your mailbox on the server by deleting it when the application receives messages.


Connect Procedure

UNIT

AHMTIEmails

Declaration

Procedure Connect;

Description :

Procedure that will establish a connection between the mailserver and your application.


Login Function

UNIT

AHMTIEmails

Declaration

Function Login: Boolean;

Description :

Function that will start the login process using the username and password on the server.


Init Function

UNIT

AHMTIEmails

Declaration

Function Init: Word;

Description :

Function that will initialize all properties of the physical message that is about to be send.


RetrieveMessage Function

UNIT

AHMTIEmails

Declaration

Function RetrieveMessage(Index : Word): TAHMMessage;

Description :

Function that allows you to retrieve only a specific message by index from the server.


RetrieveAllMessages Function

UNIT

AHMTIEmails

Declaration

Function RetrieveAllMessages(AHMVMessageList: TAHMMessages): Integer;

Description :

Function that will retrieve all messages from the server. Use the execute function instead if this will be your default operation.


RetrieveHeaders Function

UNIT

AHMTIEmails

Declaration

Function RetrieveHeaders(Index : Word): String;

Description :

Function that will only retrieve the headers of the messages that are currently on the server.


DeleteMessage Procedure

UNIT

AHMTIEmails

Declaration

Procedure DeleteMessage(Index : Word);

Description :

Function that will delete a specific message off the server.


Disconnect Procedure

UNIT

AHMTIEmails

Declaration

Procedure Disconnect;

Description :

Function that will automatically disconnect from the server. If you use the execute function you will not have to call this method.


Execute Function

UNIT

AHMTIEmails

Declaration

Function Execute : Boolean; Override;

Description :

Function that does all the default message processing to get all messages off the server into the message classes. It will automatically call functions to connect, disconnect from and to the server.


POPError Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property POPError: Boolean

Used in

TAHMPOPMail

Description

Property that stores if the last operation returned an error.


ErrorString Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ErrorString: String

Used in

TAHMPOPMail

Description

Property that stores information about the error that occurred when last trying to connect to the server.


VMessagesCount Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property VMessagesCount: Word

Used in

TAHMPOPMail

Description

Return the number of virtual messages on the server.


SessionState Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property SessionState: TAHMMailSessionState

Used in

TAHMPOPMail

Description

Indicates the state of operation the message processing is currently busy with.


Connected Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Connected: Boolean

Used in

TAHMPOPMail

Description

Indicates if the application is currently connected to the mail server.


ReplyCode Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ReplyCode: String

Used in

TAHMPOPMail

Description

Stores the reply code of the last notification returned by the server.


ReplyString Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property ReplyString: String

Used in

TAHMPOPMail

Description

Contains the reply string of the last notification returned by the server.


Canceled Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Canceled: Boolean

Used in

TAHMPOPMail

Description

If set to true the last operation was canceled.


DeleteOfServer Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property DeleteOfServer : Boolean

Used in

TAHMPOPMail

Description

If set to true the messages will be deleted off the server when received. Use this property with care. If you intend to actually get your messages into another e-mail reader then always have this property disabled.


Username Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Username: String

Used in

TAHMPOPMail

Description

Username needed to log onto the POP3 Server.


Password Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property Password: String

Used in

TAHMPOPMail

Description

Password needed to log onto the POP3 server.


OnConnect Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnConnect: TNotifyEvent

Used in

TAHMPOPMail

Description

Event that triggers when the application connects itself to the server.


OnDisconnect Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDisconnect: TNotifyEvent

Used in

TAHMPOPMail

Description

Event that triggers when the application gets disconnected from the server.


OnError Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnError: TAHMOnError

Used in

TAHMPOPMail

Description

Event that triggers when the Application receives an error from th current operation.


OnDecodeStart Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDecodeStart: TAHMOnCodingStart

Used in

TAHMPOPMail

Description

Event that triggers when the received messages is about to be decoded.


OnDecodeProgress Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDecodeProgress: TAHMOnCodingProgress

Used in

TAHMPOPMail

Description

Event that triggers when the decoding progresses.


OnDecodeEnd Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDecodeEnd: TNotifyEvent

Used in

TAHMPOPMail

Description

Event that triggers when the decoding has finished.


BeforeRetrieve Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property BeforeRetrieve: TAHMBeforeRetrieve

Used in

TAHMPOPMail

Description

Event that triggers before the Application starts receiving mail messages from the POP3 Server.


AfterRetrieve Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property AfterRetrieve: TNotifyEvent

Used in

TAHMPOPMail

Description

Event that triggers after any message that has been received by the server.


OnRetrieveProgress Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnRetrieveProgress: TAHMOnCodingProgress

Used in

TAHMPOPMail

Description

Event that triggers as the current receiviung operation progresses.


OnDelete Property

UNIT

AHMTIEmails

See also

Types, Records and Events Overview

Declaration

Property OnDelete: TAHMOnDelete

Used in

TAHMPOPMail

Description

Event that triggers when a message is being deleted off the server.